import { createSlice } from '@reduxjs/toolkit'

const detailSlice = createSlice({
	name: 'detail',
	initialState: {
		detailInfo: {
			_id: '63043046432f9033d45410fb',
			id: '46656821',
			picture_url: 'https://z1.muscache.cn/im/pictures/miso/Hosting-46656821/original/06f06712-9109-46f0-8e8c-529a947bb179.jpeg?aki_policy=large',
			picture_urls: [
				'https://z1.muscache.cn/im/pictures/miso/Hosting-46656821/original/06f06712-9109-46f0-8e8c-529a947bb179.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/b49f99be-33c4-4dfd-9a4a-9fafafb8be0a.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/bef5e8df-c4b2-43b3-9f4e-cb7cc8c6d129.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/c57fbb1b-74fa-40d8-b3e5-e5aeb2c3950c.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/bbdc8bab-ae73-47a8-854f-d9c7a34a7d54.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/408e0c17-bfa0-4a65-9c1b-96f08f0c688d.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/4d7da0eb-cf63-4364-b24b-3aaf8d03bf5a.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-46656821/original/579a164b-6a0a-4eb7-ac03-4290bb59fc1c.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-46656821/original/838b1171-bd5b-4de2-a97e-98d6a9192f95.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/99067ea6-7ac9-4db3-aaa6-cb4e9901bdd4.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/355c0d17-bd87-4187-adbb-0175519f510d.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-45678661/original/0562e1a3-63d3-42f4-a349-a7a542ee154c.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-45678661/original/0ce8f293-04d1-4fce-9a72-a4677341c52a.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-45678661/original/71b781e8-fc48-4d18-ab7d-b4c9255d3cbb.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/3a30f074-090e-44c4-b628-70b4a7bfd5f2.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/048fc218-2371-4ddd-a23a-7c6edf883339.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/c58917d1-3d7e-4507-b57f-52f031273458.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-46656821/original/80823e7d-d62f-46c5-ae98-caea5e7f264e.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-46656821/original/56c60040-39b6-4160-a841-e7fa9c378e55.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-46656821/original/346d56c3-708c-4c3f-9ed8-36f853dee67f.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-46656821/original/aa5635d6-b0dd-4194-9ba1-8c9bdb826af0.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-46656821/original/b80d8627-ee5b-4b9d-b92c-ba8df3b1f500.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-45678661/original/72f83b22-4a49-446f-9e0f-e44f9d1bb015.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-45678661/original/6e93bae4-68f8-4bd3-9fc4-055db1d7ed78.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-45678661/original/e16e0339-f056-4e23-b464-fba27233ec98.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-45678661/original/055f8437-2e80-40ba-8b1d-e5deaad041f5.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-45678661/original/b618df13-e561-432f-ac53-7e780b657284.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/miso/Hosting-45678661/original/e245392a-8b51-48e4-b700-96df29f8f960.jpeg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/f307696a-04fa-4843-8fdb-e8582062fcda.jpg?aki_policy=large',
				'https://z1.muscache.cn/im/pictures/5be8e71a-733b-4ba4-adac-de8c55297605.jpg?aki_policy=large'
			],
			verify_info: {
				messages: ['整套公寓型住宅', '1室1卫1床'],
				text_color: '#767676'
			},
			name: '乐家②公寓大床房/商务出行/一德路地铁/沙面/十三行/广医一院逸仙院/北京路',
			price: 279,
			price_format: '￥279',
			star_rating: 5,
			star_rating_color: '#FF5A5F',
			reviews_count: 30,
			reviews: [
				{
					comments: '指引很清晰，位置挺方便，也比较干净和安静~性价比可以的！',
					created_at: '2022-03-09T00:00:00Z',
					is_translated: false,
					localized_date: '2022年3月',
					reviewer_image_url: 'https://a0.muscache.com/im/pictures/user/caedbb0e-6a3a-4b6e-b6bc-59a388c56bee.jpg?aki_policy=x_medium',
					review_id: 578387812861385200
				}
			],
			bottom_info: null,
			lat: 23.11111,
			lng: 113.25877,
			image_url: '/moreitems/9bfc2e46d618d2a3fffbf91e097cd3de.jpg'
		}
	},
	reducers: {
		changeDetailInfoAction(state, { payload }) {
			state.detailInfo = payload
		}
	}
})

export const { changeDetailInfoAction } = detailSlice.actions

export default detailSlice.reducer
